//
//  XunShengDetailCell.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/4/16.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "XunShengDetailCell.h"

@implementation XunShengDetailCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self initSubView];
    }
    return self;
}
- (void)initSubView{
    [self addSubview:self.leftLabel];
    [self addSubview:self.rightLabel];
    [_leftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.mas_centerX).offset(-0.5);
        make.left.equalTo(@30);
        make.centerY.equalTo(self.mas_centerY);
        make.height.equalTo(@18);
    }];
    [_rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_centerX).offset(20);
        make.right.equalTo(@0).offset(-30);
        make.centerY.equalTo(self.mas_centerY);
        make.height.equalTo(@18);
    }];
    
    UIView *lineView = [[UIView alloc]init];
    lineView.backgroundColor = LINCOLOR;
    [self addSubview:lineView];
    [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@0);
        make.width.equalTo(@1);
        make.centerY.equalTo(self.mas_centerY);
        make.height.equalTo(@40);
    }];
    
    UIView *lineView2 = [[UIView alloc]init];
    lineView2.backgroundColor = LINCOLOR;
    [self addSubview:lineView2];
    [lineView2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(@0);
        make.width.equalTo(@1);
        make.centerY.equalTo(self.mas_centerY);
        make.height.equalTo(@40);
    }];
    
    UIView *centerLine = [[UIView alloc]init];
    centerLine.backgroundColor = LINCOLOR;
    [self addSubview:centerLine];
    [centerLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.mas_centerX);
        make.width.equalTo(@1);
        make.centerY.equalTo(self.mas_centerY);
        make.height.equalTo(@40);
    }];
}
- (UILabel *)leftLabel{
    if (!_leftLabel) {
        UILabel *label = [[UILabel alloc] init];
        label.frame = CGRectMake(435.5,474,78,11.5);
        label.numberOfLines = 0;
        label.textAlignment = 0;
        label.font = [UIFont systemFontOfSize:14];
        label.textColor = TITLECOLOR;
        label.attributedText = [PublickFunctionObject getPriceAttribute:@"学号：S21506 " and:[UIColor lightGrayColor] andChangeBenginString:@"：" andEndString:@" " andSize:12];
        _leftLabel = label;
    }
    return _leftLabel;
}
- (UILabel *)rightLabel{
    if (!_rightLabel) {
        UILabel *label = [[UILabel alloc] init];
        label.frame = CGRectMake(435.5,474,78,11.5);
        label.numberOfLines = 0;
        label.textAlignment = 0;
        label.font = [UIFont systemFontOfSize:14];
        label.textColor = TITLECOLOR;
        label.attributedText = [PublickFunctionObject getPriceAttribute:@"学号：S21506 " and:[UIColor lightGrayColor] andChangeBenginString:@"：" andEndString:@" " andSize:12];
        _rightLabel = label;
    }
    return _rightLabel;
}
@end
